<?php


namespace app\admin\model;


use think\Db;

class ProductPartLogModel extends BaseModel
{
    protected $name='product_part_log';


    public static function addLog($ppp_id,$data){

        $insert=[
            'ppp_id'=>$ppp_id,
            'purchase_id'=>$data['purchase_id'],
            'pro_id'=>$data['pro_id'],
            'part_id'=>$data['pro_part_id'],
            'iname'=>$data['iname'],
            'stuff_name'=>$data['stuff_name'],
            'inumber'=>$data['inumber'],
            'spec'=>$data['spec'],
            'total_num'=>$data['total_num'],
            'synthesis_num'=>$data['synthesis_num'],
            'actual_num'=>$data['actual_num'],
            'check_num'=>$data['check_num'],
            'return_num'=>$data['return_num'],
            'replenishment_num'=>$data['replenishment_num'],
            'reason_return'=>$data['reason_return'],
            'remark'=>$data['remark'],
            'add_time'=>time(),
        ];
        self::insertGetId($insert);
    }

}